<div class="hd-20170315">
    <div class="hd-banenr">
      <div class="banner-text">
          Entrar <a href="#">Geekvida.es &gt;&gt;</a>
      </div>
    </div>
    <div class="hd-main-content">
        <div class="hd-display-block">
          <div class="panel-layout">
            <ul class="">
              <li><a class="hdPageLInk" href="#display1">XIAOMI</a></li>
              <li><a class="hdPageLInk" href="#display2">IPHONE</a></li>
              <li><a class="hdPageLInk" href="#display3"> Móviles Reformados</a></li>
              <li style="border:none;"><a class="hdPageLInk" href="#display4">GADGETS</a></li>
            </ul>
          </div>
        </div>
    </div>
  </div>
  <style>
    .hd-20170315{background: url(./images/201703151.jpg)no-repeat center top #dfdbbf;min-width: 1300px;}
    .hd-20170315 .hd-banenr{height:505px;position: relative;width: 1103px;margin: 0px auto;overflow: hidden;}
    .hd-banenr .banner-text{position: absolute; right: 0px; font-size: 14px; width: 195px; text-align: center; background: #fff; padding: 5px; color: #000;border: 1px solid #dedede;}
    .hd-banenr .banner-text a {color:#a8d89f;font-weight: bold;}
    .hd-display-container {padding-bottom:45px;}
    .hd-display-container .hdPageTitle { padding: 0px; margin: 10px auto 15px; text-align: center; width: 985px;}
    .hd-display-container .hdPageTitle img {width: 100%;}
    .hd-link-img .product-info { display: block; height: 30px; line-height: 15px; overflow: hidden; padding: 0px 10px 0px; color: #000; margin: 5px 0px;}
    .small-list .hd-link-img {display: block; text-align: center; font-size: 14px; height: 260px; overflow: hidden; position: relative;}
    .small-list .hd-btn-buy{width: 100%; position: absolute; left: 0; top: 80px; color: #fff; font-size: 20px; height: 50px; line-height: 50px; background: rgba(0, 0, 0, 0.6);transform: scale(0,0);-webkit-transform: scale(0,0);-ms-transform: scale(0,0);-o-transform: scale(0,0);opacity: 0;-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -ms-transition: all 0.5s ease; -o-transition: all 0.5s ease; transition: all 0.5s ease;}
    .small-list:hover .hd-btn-buy {transform: scale(1,1);-webkit-transform: scale(1,1);-ms-transform: scale(1,1);-o-transform: scale(1,1);opacity: 1;}
    .hd-main-content .price {display: block;padding: 0;}
    .hd-main-content .current-price { font-size: 28px;color: #000;line-height: 22px;}
    .hd-main-content .old-price {font-size: 14px;text-decoration: line-through;color:#777;}
    .hd-product-list .list {background:#fff;}
    .hd-product-list .list:hover img {opacity: 0.8;}
    .small-list .discount-number2{ position: absolute; height: 50px; width: 50px; font-size: 18px; color: #61a434; top: 0px; right: 0px; line-height: 50px; text-align: center; background: #cdf0b6; border-radius: 50%; font-weight: bold;}
    ul li.small-list {width:190px;}
    ul li.small-list:before{pointer-events: none;position: absolute;z-index: -1;content: '';top: 100%;left: 5%;height: 10px;width: 90%;opacity: 0;background: -webkit-radial-gradient(center, ellipse, rgba(0, 0, 0, 0.35) 0%, transparent 80%);background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, transparent 80%);-webkit-transition-duration: 0.3s;transition-duration: 0.3s;-webkit-transition-property: transform, opacity;transition-property: transform, opacity;}
    ul li.small-list:hover:before{opacity: 1;-webkit-transform: translateY(5px);transform: translateY(5px);}
    .hd-20170315 ul li {float: left;position: relative;-webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; -ms-transition: all 0.3s ease; -o-transition: all 0.3s ease; transition: all 0.3s ease;margin:5px;}
    .hd-20170315 .hd-product-list {box-shadow: 0px 0px 40px #1A1818;-webkit-box-shadow: 0px 0px 40px #1A1818;padding:20px 12px 20px 20px;background: rgba(247, 252, 255, 0.6);}
    .hd-product-list .lis1 {margin:0px;}
    ul li.small-list:hover,.product-list ul li:hover {transform: translateY(-6px);-webkit-transform: translateY(-6px); -o-transform: translateY(-6px); -ms-transform: translateY(-6px); -moz-transform: translateY(-6px);}
    ul li.small-list .product-img {width: 100%; padding: 10px; box-sizing: border-box;border: 1px solid #777;background: #Fff;}
   .panel-layout{width:100%; position: fixed; top: 0; text-align: center;background:#dfdbbf;-webkit-box-shadow: 0px 0px 40px #1A1818;-ms-box-shadow: 0px 0px 40px #1A1818;-o-box-shadow: 0px 0px 40px #1A1818;box-shadow: 0px 0px 40px #1A1818;display: none;}
  .panel-layout .panel-top {position: absolute; left: 0px; z-index: 999; top: 0px;}
  .panel-layout ul li{list-style: none; display: inline-block; width:calc(100% / 4 - 1px);margin:0px;border-right:1px solid #C2ACAC;}
  .panel-layout ul li a{ color: #000; text-align: center; display: inline-block; padding: 10px 0px; font-size: 20px; text-transform: uppercase; font-weight: lighter; font-family: Arial;width: 100%;}
  .panel-layout ul li.current a,.panel-layout ul li a:hover{color:#fff;}
  .panel-layout ul li.current,.panel-layout ul li:hover {background: #61a434;}
</style>

<script type="text/javascript">
    (function($){
        $(function(){
          var str1 = '', str2 = '';
          for(var i = 0; i < 15; i++){
            str1 += `<li class="small-list">
                      <a class="hd-link-img" href="#">
                        <img class="product-img" src="./images/2016040616.jpg"  alt="Blackview Ultra A6 Plus 2GB 16GB Dorado">
                        <span class="product-info">Blackview Ultra A6 Plus 2GB 16GB Dorado</span>
                          <span class="price">
                            <span class="old-price">129.95€</span>
                            <span class="current-price">99.95€</span>
                          </span>
                          <span class="hd-btn-buy">Comprar &gt;&gt;</span>
                      </a>
                      <span class="discount-number2">-25€</span>
                    </li>`;
          }
          for(var i = 0; i < 4; i++){
            str2 += `<div class="hd-display-container" id="display${i+1}">
                        <div class="hd-product-list w1005">
                          <h2 class="hdPageTitle"><img src="./images/201703152.jpg" alt="xiaomi"></h2> 
                          <ul class="lis1 clearfloat">${str1}</ul>
                        </div>
                    </div>`;
          }
          $(".hd-main-content").prepend(str2);
          var sideNav = $(".panel-layout");
          $(window).on("scroll",function(){
            var sideNavShow = $(".hd-20170315 .hd-banenr").offset().top + $(".hd-20170315 .hd-banenr").outerHeight(true)-80;
            var modTop = [];
            if($(this).scrollTop()>=sideNavShow){
                sideNav.slideDown(600);;
              }
              else{
                sideNav.slideUp(600);
              }
            
            for (var i = 0; i < $(".panel-layout ul li .hdPageLInk").length; i++) {
                modTop[i] = $($(".panel-layout ul li a").eq(i).attr("href")).offset().top-40;

                if ($(window).scrollTop() >= modTop[i]) {
                  $(".panel-layout ul li").removeClass('current').eq(i).addClass('current');
                };
              };
          });
          
          sideNav.find("li").find(".hdPageLInk").on("click",function(e){
            e.preventDefault();
            var aHash = this.hash;
            $("html,body").animate({
              scrollTop: $(aHash).offset().top-35
            });
          });
        });
    })(jQuery); 
  </script>